<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<div id="box">
			Hello JQuery
		</div>
		<script src="../jquery-1.12.4.min.js"></script>
		<script>
			//原生JS实现
			/*var div=document.getElementById('box');
			div.onmouseover=function(){
				div.style.background='greenyellow';
			}
			div.onmouseleave=function(){
				div.style.background='white';
			}
			*/
			//jquery实现
			$('#box').mouseover(
				function(){
					$('div').css('background','greenyellow');
				}
			);
			$('#box').mouseout(function(){
					$('div').css('background','white');
			})
			;
		</script>
	</body>
</html>
